package com.zhanyf.heilan.cg.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zhanyf.heilan.cg.dao.ContractMapper;
import com.zhanyf.heilan.cg.domain.Contract;

@Service
public class ContractServiceImpl implements ContractService {

	@Autowired
	private ContractMapper contractMapper;

	public List<Contract> listContractsBriefly(long start, int limit) {
		return contractMapper.listContractsBriefly(start, limit);
	}

	@Override
	@Transactional
	public void addContractBriefly(Contract contract) {
		contractMapper.addContractBriefly(contract);
	}

	@Override
	@Transactional
	public void deleteContractBriefly(Long id) {
		contractMapper.deleteContractBriefly(id);
	}

	@Override
	public Contract getContractBriefly(Long id) {
		return contractMapper.getContractBriefly(id);
	}

	@Override
	public void modifyContractBriefly(Contract contract) {
		contractMapper.modifyContractBriefly(contract);
	}
}
